<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Title</title>
	<script src="jquery.min.js"></script>
</head>
<body>

<a href="https://www.baidu.com">你好</a>
<input type="button" name="" value="点击">


<script>
	$('button').click(function () {

	})

	window.onbeforeunload=function () {
		return '关闭提示';
	}
</script>
</body>
</html>